import request from '@/utils/request'

const baseURL = '/measuringTools'

// 新增或修改计量器具信息
export const saveOrUpdate = (data = {}) => {
  return request({
    url: `${baseURL}/saveOrUpdate`,
    method: 'post',
    data
  })
}

// 通过上级编码查询下级计量器具信息
export const selectMeasuringToolsList = (toolsNumber) => {
  return request({
    url: `${baseURL}/selectMeasuringToolsList`,
    params: {
      toolsNumber
    }
  })
}

// 根据ID查询计量器具信息
export const loadMeasuringTools = (id) => {
  return request({
    url: `${baseURL}/loadMeasuringTools`,
    params: {
      id
    }
  })
}

// 根据ID删除计量器具信息
export const del = (id) => {
  return request({
    url: `${baseURL}/delete`,
    params: {
      id
    }
  })
}
